package com.weight.common.generate.temple;

import java.util.List;
import java.util.Map;

import com.weight.common.generate.base.ResourceFile;
 

/**
* 
*  
*/
public class AuthFile extends ResourceFile {
	private static final String FILE_NAME = ".txt";
	
//	protected String fileDir;// 文件路径
//	protected String fileName;//文件名
//	protected String resource;//文件內容
	
	public AuthFile(String filePath,String fileName,String model,List<String> fieldENList,List<String> fieldCNList,
			String tableCnName,String packageName) {
		
		super(filePath,new StringBuilder(fileName).append(FILE_NAME).toString());
		StringBuilder  resourceFile =new StringBuilder();
		
		StringBuilder beanName=getModelClass(model);
		
		 
		resourceFile.append("#").append(tableCnName).append("EN\n");
		 
		
		resourceFile.append("bean =new MenuInfo(\"111\",\"0\",\"").append(tableCnName).append( "查询\",\"").append(packageName)
					.append("/").append(model).append("/queryFor").append(beanName).append("List\",\"1\",\"1\",\"1002\");menuList.add(bean);\n");
		
		resourceFile.append("bean =new MenuInfo(\"111\",\"0\",\"").append(tableCnName).append( "添加\",\"").append(packageName)
		.append("/").append(model).append("/add").append(beanName).append("\",\"1\",\"1\",\"1002\");menuList.add(bean);\n");

		 
		resourceFile.append("\n");
		resourceFile.append("\n");
		 
//		bean =new MenuInfo("111","0","开发者快捷生成器",null,"1","1","1002");menuList.add(bean);
		String resource = resourceFile.toString();
		init(resource);
	}
}
